package com.zhuoya.healthcard.net;



import com.zhuoya.healthcard.update.UpdateEntity;

import java.util.HashMap;
import java.util.Map;


public class CommonApiClient extends HttpClient {

    private CommonApi apiService;

    private static volatile CommonApiClient instance;

    private CommonApiClient() {
        apiService = getRetrofit().create(CommonApi.class);
    }

    public static CommonApiClient getInstance() {
        if (instance == null) {
            synchronized (CommonApiClient.class) {
                if (instance == null) {
                    instance = new CommonApiClient();
                }
            }
        }
        return instance;
    }


    public void checkUpdate(ApiRequestCallBack<UpdateEntity> callBack) {
        requestWithSubscribeRetry(apiService.checkUpdate(), callBack);
    }




}
